package com.lxl.priv.bak;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author xiulong.liu
 * @Date 2024/10月/11/星期五 15:56
 * @Desc
 */
public class CsvConent {
    public static void main(String[] args) {
        boolean isYl = true;
        int extraLen = 2;
        int len = 1;
        int size = 4;
        String[] values = new String[]{"id", "card", "phone","1"};
        //String[] values = new String[]{"id", "card", "phone"};
        String[] values1 = new String[]{"id","extr1", "extr2","1"};
        //String[] values1 = new String[]{"id", "extr1", "extr2"};
        String[] arr = isYl ? new String[values.length]
                : new String[values.length + 1];
        for (int i = 0; i < values.length; i++) {
            arr[i] = values[i];
            if (!isYl) {
                arr[i + 1] = "label";
            }
        }
        for (String s : arr) {
            System.out.println("s = " + s);
        }
        // 第二个文件
        List<String> list = new ArrayList<String>();
        for (int i = 0; i < len; i++) {
            list.add(values[i]);
        }
        //遍历冗余
        for (int i = extraLen; i <= size; i++) {
            list.add("");
        }

        for (String str : list) {
            System.out.println("str = " + str);
        }

    }
}
